<template>

    <!-- 添加或修改对话框 -->
    <lam-dialog title="订单发货信息" :visible.sync="open" width="600px" append-to-body @close="cancel">
      <el-form :ref="formRef" :model="form" :rules="rules" label-width="100px" :disabled="formDisabled">
        <el-row>
          <el-col :span="12">
            <el-form-item label="快递公司" prop="dvyId">
              <lam-dict-select v-model="form.dvyId" dictCode="delivery" dictType="tableDict" placeholder="" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="快递单号" prop="dvyFlowNo">
              <el-input v-model="form.dvyFlowNo" clearable placeholder="" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm" :loading="loading">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </lam-dialog>

</template>

<script>
import { EditMixin } from '@/components/mixins/EditMixin';

export default {
  name: "OrderDevy",
  mixins:[EditMixin],
  data() {
    return {
      url: {
        delivery: '/mall/order/delivery'
      },
      // 表单校验
      rules: {
        dvyId: [{required: true, message: "公请选择快递公司", trigger: "blur" }],
        dvyFlowNo: [{ required: true, message: "请填写快递单号", trigger: "blur" }],
      },
    };
  },
  created() {
  },
  methods: {
    // 表单重置
    reset() {
      this.form = {
        dvyId: null,
        dvyFlowNo: null,
        orderNumber: '',
      };
    },

    /** 提交按钮 */
    submitForm(){
      this.saveForm(this.url.delivery);
    }

  }
};
</script>
